package com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.entities;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
　　* @description: 文件资源操作查询条件对象
　　* @author shenrm
　　* @date 2021/11/21 18:32 
　　*/
public class FileResourceHandleExample {

    protected String orderByClause;

    protected List<FileResourceHandleExample.Criteria> oredCriteria;

    public FileResourceHandleExample() {
        oredCriteria = new ArrayList<FileResourceHandleExample.Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public List<FileResourceHandleExample.Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(FileResourceHandleExample.Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public FileResourceHandleExample.Criteria or() {
        FileResourceHandleExample.Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public FileResourceHandleExample.Criteria createCriteria() {
        FileResourceHandleExample.Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected FileResourceHandleExample.Criteria createCriteriaInternal() {
        FileResourceHandleExample.Criteria criteria = new FileResourceHandleExample.Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
    }

    protected abstract static class GeneratedCriteria {
        protected List<FileResourceHandleExample.Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<FileResourceHandleExample.Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<FileResourceHandleExample.Criterion> getAllCriteria() {
            return criteria;
        }

        public List<FileResourceHandleExample.Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new FileResourceHandleExample.Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new FileResourceHandleExample.Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new FileResourceHandleExample.Criterion(condition, value1, value2));
        }

        public FileResourceHandleExample.Criteria andIdIsNull() {
            addCriterion("id is null");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andDeploymentIdIsNull() {
            addCriterion("deployment_id is null");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andDeploymentIdIsNotNull() {
            addCriterion("deployment_id is not null");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andDeploymentIdEqualTo(String value) {
            addCriterion("deployment_id =", value, "deploymentId");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andDeploymentIdIn(List<String> values) {
            addCriterion("deployment_id in", values, "deploymentId");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andDeploymentIdNotIn(List<String> values) {
            addCriterion("deployment_id not in", values, "deploymentId");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andAttachIdIsNull() {
            addCriterion("attach_id is null");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andAttachIdIsNotNull() {
            addCriterion("attach_id is not null");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andAttachIdEqualTo(String value) {
            addCriterion("attach_id =", value, "attachId");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andAttachIdIn(List<String> values) {
            addCriterion("attach_id in", values, "attachId");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andAttachIdNotIn(List<String> values) {
            addCriterion("attach_id not in", values, "attachId");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andActivityIdIsNull() {
            addCriterion("activity_id is null");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andActivityIdIsNotNull() {
            addCriterion("activity_id is not null");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andActivityIdEqualTo(String value) {
            addCriterion("activity_id =", value, "activityId");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andActivityIdIn(List<String> values) {
            addCriterion("activity_id in", values, "activityId");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andServiceTypeEqualTo(String value) {
            addCriterion("service_type =", value, "serviceType");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andServiceTypeIn(List<String> values) {
            addCriterion("service_type in", values, "serviceType");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("create_time =", value, "createTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("create_time <>", value, "createTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("create_time >", value, "createTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_time >=", value, "createTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andCreateTimeLessThan(Date value) {
            addCriterion("create_time <", value, "createTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("create_time <=", value, "createTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("create_time in", values, "createTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("create_time not in", values, "createTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("create_time between", value1, value2, "createTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("create_time not between", value1, value2, "createTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andUpdateTimeIsNull() {
            addCriterion("update_time is null");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andUpdateTimeIsNotNull() {
            addCriterion("update_time is not null");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andUpdateTimeEqualTo(Date value) {
            addCriterion("update_time =", value, "updateTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andUpdateTimeNotEqualTo(Date value) {
            addCriterion("update_time <>", value, "updateTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andUpdateTimeGreaterThan(Date value) {
            addCriterion("update_time >", value, "updateTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("update_time >=", value, "updateTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andUpdateTimeLessThan(Date value) {
            addCriterion("update_time <", value, "updateTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterion("update_time <=", value, "updateTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andUpdateTimeIn(List<Date> values) {
            addCriterion("update_time in", values, "updateTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andUpdateTimeNotIn(List<Date> values) {
            addCriterion("update_time not in", values, "updateTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andUpdateTimeBetween(Date value1, Date value2) {
            addCriterion("update_time between", value1, value2, "updateTime");
            return (FileResourceHandleExample.Criteria) this;
        }

        public FileResourceHandleExample.Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterion("update_time not between", value1, value2, "updateTime");
            return (FileResourceHandleExample.Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends FileResourceHandleExample.GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}
